V668 There is no sense in testing the 'wpt_tmp' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
}
break;
case rtedata:
- if (linecount > 5 && wpt_tmp) {/* skipping over file header */
+ if ((linecount > 5) && !header) {/* skipping over file header */
ozi_convert_datum(wpt_tmp);
- if (!header) {
- route_add_wpt(rte_head, wpt_tmp);
- } else {
- delete wpt_tmp;
- }
+ route_add_wpt(rte_head, wpt_tmp);
} else {
delete wpt_tmp;
}